//
//  HomePageTableViewCell.m
//  BakeCenter
//
//  Created by lanou3g on 15/9/19.
//  Copyright (c) 2015年 Baked. All rights reserved.
//

#import "HomePageTableViewCell.h"

@implementation HomePageTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backgroundColor = [UIColor clearColor];
        UIImageView *backGround = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tu14597_5.jpg"]];
//        [backGround mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.left.equalTo(self.mas_left).offset(5);
//            make.right.equalTo(self.mas_right).offset(5);
//            make.top.equalTo(self.mas_top).offset(5);
//            make.bottom.equalTo(self.mas_bottom).offset(5);
//        }];
        backGround.frame = CGRectMake(5, 5, kScreenWidth - 10,  190);
        backGround.layer.masksToBounds = YES;
        backGround.layer.cornerRadius = 10;
        backGround.layer.shadowColor = [[UIColor grayColor] CGColor];
        backGround.layer.borderWidth = 1;
        backGround.layer.borderColor = [[UIColor whiteColor] CGColor];
        [self.contentView addSubview:backGround];
        
        self.pic = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, backGround.frame.size.width - 10,180)];
        self.pic.layer.cornerRadius = 10;
        self.pic.layer.masksToBounds = YES;
//        self.pic.backgroundColor = [UIColor redColor];
        [backGround addSubview:self.pic];
        
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(self.pic.left + 5, 5, self.pic.frame.size.width - 10, 30)];
//        self.title.backgroundColor = [UIColor blueColor];
        self.title.textColor = [UIColor robinEggColor];
        self.title.font = [UIFont boldSystemFontOfSize:18];
        [self.pic addSubview:self.title];
//
//        self.discription = [[UILabel alloc] initWithFrame:CGRectMake(self.title.frame.origin.x + 100, self.title.bottom, 200, 70)];
//        self.discription.numberOfLines = 4;
////        self.discription.backgroundColor = [UIColor yellowColor];
//        self.discription.font = [UIFont fontWithName:@"Arial-ItalicMT" size:12];
//        self.discription.textColor = [UIColor whiteColor];
//        
//        [self.pic addSubview:self.discription];
        
    }
    return self;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
